import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:ref/ref.dart';

// import 'dart:async';
// import 'package:flutter/services.dart';

// class Ref {
//   static const MethodChannel _channel =
//       const MethodChannel('ref');

//   static Future<String?> get platformVersion async {
//     final String? version = await _channel.invokeMethod('getPlatformVersion');
//     return version;
//   }
// }

void main() {
  const MethodChannel channel = MethodChannel('ref');

  TestWidgetsFlutterBinding.ensureInitialized();

  setUp(() {
    channel.setMockMethodCallHandler((MethodCall methodCall) async {
      return '42';
    });
  });

  tearDown(() {
    channel.setMockMethodCallHandler(null);
  });

  test('test', () async {
    // expect(await Ref.platformVersion, '42');

    var count = Ref(1);
    count.value++;
    expect(count, 2);
  });
}
